<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢迎</title>
</head>

<body>
    欢迎: <h3 id="email"></h3>
    <script src="./jquery.3.3.1.min.js"></script>
    <script>

        

        $(function () {

            setTimeout(function () {
                var url = "http://local.nick.xin/api/user/info";
                $.get(url, function (data) {
                    if ("fail" == data) {
                        window.location.href = "login.html";
                    } else {
                        console.log(data)
                        var email = $("#email");
                        email.text(data);
                    }
                })
            }, 300)


        })


    </script>
</body>

</html>